import 'package:flutter/material.dart';

import '../../../utils/tools/screenutil_tool.dart';

class TipsWidget extends StatelessWidget {
  List listItem = ["等待安装", "安装失败", "权限不足"];
  int state;

  TipsWidget(int state) {
    this.state = state;
  }

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      height: double.infinity,
      color: state > listItem.length ? Color.fromRGBO(0, 0, 0, .3) : null,
      child: state < listItem.length ? Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          state != 0 ? Icon(Icons.error,size: ST.setsp(180),color: Colors.red) :
          Icon(Icons.extension,size: ST.setsp(180),color: Colors.blue),
          Text("${listItem[state]}")
        ],
      ) : SizedBox.shrink(),
    );
  }
}